import { http } from '@/utils/luch-request/index.js'

let getAction = function(url, param, callback) {
	
	return new Promise((resolve, reject) => {
		http.get(url, {
			params: param
		}).then((res)=>{
			if(res && res.statusCode && res.statusCode == 200){
				// console.log('res.data---:', res.data)
				callback(res.data)
			}
			resolve()
		}).catch((err)=>{
			reject(err)
			console.log('request fail', err);
		})
	})
}

export default{
	getAction,
}